package com.kum.utils;

import com.baidu.aip.face.AipFace;

/**
 * @version V1.0
 * @Package com.kum.utils
 * @auhter 枯木Kum
 * @date 2021/3/9-6:00 PM
 */
public class BaiduFaceUtils {
    private static final String APP_ID = "10435541";
    private static final String API_KEY = "BwFXYgAks5RkaHcGHDx7hZGo";
    private static final String SECRET_KEY = "mljTYqMnys6DgnvDW9Zxsfc1OibIda9K";
    private static AipFace client = null;

    private static void init() {
        client = new AipFace(APP_ID, API_KEY, SECRET_KEY);
        client.setConnectionTimeoutInMillis(2000);
        client.setSocketTimeoutInMillis(60000);
    }

    public static AipFace getInstance() {
        if (client == null) {
            init();
        }
        return client;
    }

}
